﻿@page "/indexSetting"
@namespace SwashbucklerDiary.Pages
@inherits PageComponentBase

<MyAppBar Title="@(I18n.T("Setting.Display.Index.Name"))"
          OnClick="NavigateToBack">
</MyAppBar>

<MCard Class="setting-card"
       Elevation="0"
       Rounded="@("lg")">
    <MList>
        <MListItem>
            <MListItemIcon>
                <MIcon Class="list-item-icon">
                    mdi-calendar-range-outline
                </MIcon>
            </MListItemIcon>
            <MListItemContent>
                @(I18n.T("Setting.Display.Index.Date.Name"))
            </MListItemContent>
            <MListItemAction>
                <MSwitch @bind-Value="Date"
                         TValue="bool"
                         OnChange="SettingChange(SettingType.Date)"
                         Dense="true"
                         Inset="true"
                         Color="white"
                         TrackColor="@MSwitchTrackColor(Date)">
                </MSwitch>
            </MListItemAction>
        </MListItem>
        <MDivider Class="mx-3"></MDivider>
        <MListItem>
            <MListItemIcon>
                <MIcon Class="list-item-icon">
                    mdi-hand-wave-outline
                </MIcon>
            </MListItemIcon>
            <MListItemContent>
                @(I18n.T("Setting.Display.Index.WelcomeText.Name"))
            </MListItemContent>
            <MListItemAction>
                <MSwitch @bind-Value="WelcomText"
                         TValue="bool"
                         OnChange="SettingChange(SettingType.WelcomeText)"
                         Dense="true"
                         Inset="true"
                         Color="white"
                         TrackColor="@MSwitchTrackColor(WelcomText)">
                </MSwitch>
            </MListItemAction>
        </MListItem>
    </MList>
</MCard>
